import { ref } from "vue";
import type { AvueFormOption } from "@smallwei/avue";

export default function () {
  const option: AvueFormOption = {
    menuBtn: false,
    labelWidth: 110,
    column: [
      {
        type: "select",
        prop: "companyId",
        label: "关联公司",
        dataType: "string",
        dicUrl: "/api/companyInfo/list",
        props: {
          label: "name",
          value: "id",
        },
        rules: [
          {
            required: true,
            message: "请选择关联公司",
          },
        ],
      },
      {
        prop: "imgUrl",
        type: "upload",
        label: "图片",
        listType: "picture-img",
        action: "/api/upload",
        dataType: "string",
        span: 24,
        tip: "1900 * 500的图片最佳",
      },
    ],
  };
  return ref(option);
}
